package com.exam.controller;

import com.exam.pojo.ComposePaper;
import com.exam.service.ComposePaperService;
import jakarta.annotation.Resource;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class ComposePaperController {//组卷
    @Resource
    private ComposePaperService composePaperService;
    @PostMapping("/compose/paper")
    public Boolean addPaperMap(@RequestBody ComposePaper composePaper){
        try {
            composePaperService.composing(composePaper);
            return true;
        }catch (Exception e){
            e.printStackTrace();
            return false;
        }
    }
}
